import 'package:flutter/material.dart';
import 'package:life_milestones/features/MS-home-group/MS-edit-group-page.dart';
import 'package:life_milestones/features/MS-home-group/MS-group-detail-page.dart';
import 'MS-home-page.dart';

Route<dynamic>? onGenerateRoute(RouteSettings settings){
  switch(settings.name){
    case "/":return MaterialPageRoute(builder: (_)=>MSHomePage());
    case "/group-edit":return MaterialPageRoute(builder: (context)=>MSEditGroupPage());
    case "/group-detail":return MaterialPageRoute(builder: (context)=>MSGroupDetailPage(id: settings.arguments! as int,));

  }

  return MaterialPageRoute(builder: (context)=>MSHomePage());
}